<?php

Route::group(['domain' => env('API_HOST',''), 'namespace' => 'Modules\Api\Http\Controllers'], function()
{
    Route::get('/', 'ApiController@index');
    Route::get('login', function () {return ['state'=>99,'msg'=>'please go to login_api','data'=>[],'error'=>'99'];})->name('login');//登录
    Route::post('api_login', ['as' => 'api_login', 'uses' => 'ApiController@login']);//接口登录
    Route::post('api-multiple_imgs_upload', ['as' => 'api_multiple_imgs_upload', 'uses' => 'ApiController@multiple_imgs_upload']);//多个图片上传
    Route::group(['middleware' => 'auth:api'], function()
    {
        Route::get('api_me', ['as' => 'api_me', 'uses' => 'ApiController@api_me']);//接口获取用户信息


        //
        //    Route::group(['middleware' => 'auth:api'], function()
        //    {
        //        Route::post('api_login', ['as' => 'api_login', 'uses' => 'AuthController@login']);//接口登录
        //        Route::get('api_me', ['as' => 'api_me', 'uses' => 'IndexController@api_me']);//接口获取用户信息
        //        //    Route::post('logout', 'IndexController@logout');
        //        //    Route::post('refresh', 'IndexController@refresh');
        //    });
    });
    require_once __DIR__.'/temp_route/wu_route.php';
    require_once __DIR__.'/temp_route/huqin_route.php';
    require_once __DIR__.'/temp_route/yangxiaodong_route.php';

    //分享有礼
    Route::get('share', 'H5Controller@share');

    //分享有礼注册页
    Route::get('share-register', 'H5Controller@share_register');

    //用户邀请的列表
    Route::get('my-invite', 'H5Controller@my_invite');

    //分享下载APP
    Route::get('share-app', 'H5Controller@share_app');

    //客户服务-H5帮助中心
    Route::get('help-center', 'H5Controller@help_center');

    //客户服务-H5帮助中心-详情
    Route::get('help-center_detail', 'H5Controller@help_center_detail')->name('help_center_detail');

    //门店加盟-H5门店加盟
    Route::get('help-shop_join', 'H5Controller@help_shop_join');

    //H5保养手册
    Route::get('handbook', 'H5Controller@handbook');

    //H5资讯
    Route::get('news', 'H5Controller@news');

    //H5资讯Ajax获取评论
    Route::get('comment', 'H5Controller@comment');

    //H5资讯Ajax点赞创建评论,删除评论
    Route::post('zan-comment-del', 'H5Controller@zan_comment_del');

});




